package com.glor.operation.common;

import com.glor.operation.common.code.HttpCode;

/**
 * Created by heylear.cai on 2016/2/18.
 */
public class DataResponse<T> implements Response {
    int status;

    String message;

    T data;

    public DataResponse() {
        this(HttpCode.HTTP_OK);
    }

    public DataResponse(Response response) {
        this.status = response.getStatus();
        this.message = response.getMessage();
    }

    public DataResponse(int status, String message) {
        this.status = status;
        this.message = message;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public void setData(T data) {
        this.data = data;
    }

    public T getData() {
        return data;
    }
}
